import request from '@/utils/request'

//统一字典下拉框查询
export function adminDict(params) {
    return request({
        url: `common/v1/adminDict`,
        params
    })
}

//查询分红日历列表
export function bonusList(params) {
    return request({
        url: `/shenye/coco/bonus/list`,
        method: 'get',
        params
    })
}
//新增分红日期
export function addBonus(data) {
    return request({
        url: '/shenye/coco/bonus',
        method: 'post',
        data
    })
}
//查询分红详情
export function bonusDetail(id) {
    return request({
        url: `/shenye/coco/bonus/detail/${id}`,
        method: 'get',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
    })
}
//编辑分红日期
export function editBonus(data) {
    return request({
        url: '/shenye/coco/bonus',
        method: 'put',
        data
    })
}
//删除分红日期
export function removeBonus(id) {
    return request({
        url: `/shenye/coco/bonus/${id}`,
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        method: 'DELETE',
    })
}
//分红模拟
export function bonusImitate(params) {
    return request({
        url: `/shenye/coco/bonus/imitate`,
        method: 'get',
        params
    })
}
//查询分红明细
export function detailList(params) {
    return request({
        url: `/shenye/coco/bonus/detail/list`,
        method: 'get',
        params
    })
}